package com.dong.design.factory.abstract_;

import com.dong.design.factory.Circle;
import com.dong.design.factory.Rectangle;
import com.dong.design.factory.Shape;
import com.dong.design.factory.Square;

/**
 * @author jianyang206881
 * @date 2018/6/7
 */
public class ShapeFactory extends AbstractFactory {
    @Override
    public Color getColor(String colorType) {
        return null;
    }

    @Override
    public Shape getShape(String shapeType) {
        switch (shapeType) {
            case "circle":
                return new Circle();
            case "square":
                return new Square();
            case "rectangle":
                return new Rectangle();
            default:
                return null;
        }
    }
}
